<form class="form-horizontal" name="user_form" ng-submit="upset()">
  <div class="modal-header">
    <a class="close" ng-click="close()">&times;</a>
    <div class="input-prepend input-append">
      <h4>{{title}}</h4>
    </div>
  </div>
  <div class="modal-body">
    <div class="control-group">
      <label class="control-label">用户名</label>
      <div class="controls">
        <input type="text" required ng-model="user.username" ng-disabled="method=='update'" class="input" ng-pattern="/^\w+$/"/>
      </div>
    </div>
    <div class="control-group">
      <label class="control-label">密码：</label>
      <div class="controls">
        <input type="password" required ng-model="user.password" class="input" ng-minlength="6"/>
      </div>
    </div>
    <div class="control-group">
      <label class="control-label">组织：</label>
      <div class="controls">
        <input type="text" required ng-model="user.organize" class="input"/>
      </div>
    </div>
    <div class="control-group">
      <label class="control-label">电话：</label>
      <div class="controls">
        <input type="text" required ng-model="user.phone" class="input" ng-pattern="/\d+/"/>
      </div>
    </div>
    
  </div>
  <div class="modal-footer">
    <a data-dismiss="modal" class="btn" ng-click="close()">关闭</a>
    <button type="submit" ng-disabled="!user_form.$valid" class="btn btn-primary" ng-click="upset()">保存</button>
  </div>
</form>
